//
//  SelectParameterViewCell.m
//  ForestPack
//
//  Created by 骆锴 on 2018/7/24.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "TitleInformationViewCell.h"
#import "PaperBoardDetialModel.h"

@interface TitleInformationViewCell ()

@property (nonatomic, strong) UILabel *model;
@property (nonatomic, strong) UILabel *material;
@property (nonatomic, strong) UILabel *materialvalue;

@end

@implementation TitleInformationViewCell

+ (TitleInformationViewCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"TitleInformationCell";
    TitleInformationViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[TitleInformationViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.backgroundColor = [UIColor whiteColor];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        [cell createSubView];
    }
    
    return cell;
}

-(void)createSubView{
    _model =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(19), ScreenX375(200), ScreenX375(17))];
    _model.text = @"4Y-E/B";
    _model.font = Kfont(18);
    _model.textColor = REXADECIMALCOLOR(@"#333333");
    _model.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_model];
    
    _material =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(43), ScreenX375(40), ScreenX375(17))];
    _material.text = @"材质:";
    _material.font = Kfont(14);
    _material.textColor = REXADECIMALCOLOR(@"#333333");
    _material.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_material];
    
    _materialvalue =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(59), ScreenX375(43), ScreenX375(60), ScreenX375(17))];
    _materialvalue.text = @"4Y";
    _materialvalue.font = Kfont(18);
    _materialvalue.textColor = REXADECIMALCOLOR(@"#333333");
    _materialvalue.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_materialvalue];
}

- (void)initWithModel:(PaperBoardDetialModel *)model {
    self.model.text = model.card_name;
    self.materialvalue.text = model.material;
}

@end
